using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MJB.UI.ContentEditor.Windows
{
    /// <summary>
    /// Interaction logic for NewFolderWindow.xaml
    /// </summary>
    public partial class NewFolderWindow : Window
    {
        /// <summary>
        /// This is the new folder name property.
        /// </summary>
        public static DependencyProperty NewFolderNameProperty = DependencyProperty.Register("NewFolderName",
            typeof(string),
            typeof(NewFolderWindow),
            new PropertyMetadata(null));

        /// <summary>
        /// Creates the new folder window.
        /// </summary>
        public NewFolderWindow()
        {
            InitializeComponent();
            mNewFolderTextBox.Focus();
        }

        /// <summary>
        /// Gets / sets the new folder name.
        /// </summary>
        public string NewFolderName
        {
            get
            {
                return (string)GetValue(NewFolderNameProperty);
            }
            set
            {
                SetValue(NewFolderNameProperty, value);
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void OnOKButtonClicked(object o, EventArgs args)
        {
            this.NewFolderName = mNewFolderTextBox.Text;
            this.Close();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void OnCancelButtonClicked(object o, EventArgs args)
        {
            this.NewFolderName = null;
            this.Close();
        }

    }

}